package com.xzx.annotation.applicationlistener;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/5/10 17:38
 */
@ComponentScan("com.xzx.annotation.applicationlistener")
@Configuration
public class ApplicationListenerConfig {

    @EventListener
    public void onApplicationEvent(MyApplicationEvent event) {
        System.out.println("监听到事件：" + event.getSource());
    }
}
